﻿<controls:ChildWindow x:Class="LyncSilverlightApplication.addContactUri"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
           xmlns:custom="clr-namespace:LyncSilverlightApplication"
           Width="400" Height="400" Title="連絡先追加/削除" Loaded="ChildWindow_Loaded_1">
    <controls:ChildWindow.Resources>
        <DataTemplate x:Key="ContactInfoTemplate">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Column="0" Text="{Binding DisplayName}" Margin="3"/>
            </Grid>
        </DataTemplate>
    </controls:ChildWindow.Resources>
    <Grid x:Name="LayoutRoot" Margin="2">

        <Grid.RowDefinitions>
            <RowDefinition Height="auto"/>
            <RowDefinition Height="auto"/>
            <RowDefinition Height="auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Grid Grid.Row="0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Button x:Name="AddContactButton" Content="+" HorizontalAlignment="Left" Margin="306,11,0,0" 
    		    VerticalAlignment="Top" Width="17" Click="AddContactButton_Click" Height="20"/>

            <Button x:Name="RemoveContactButton" Content="-" HorizontalAlignment="Left"  Height="20"
    		    Margin="327,11,0,0" VerticalAlignment="Top" Width="17" Click="RemoveContactButton_Click"/>
            <TextBlock HorizontalAlignment="Left" Margin="7,13,0,0" TextWrapping="Wrap" Text="接続先Sip Uri:" VerticalAlignment="Top" Width="85"/>
            <TextBox x:Name="ContactSipUriTextBox" HorizontalAlignment="Left" Height="23" Margin="107,11,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="191"/>
        </Grid>
        <TextBlock Text="Other Contacts Group:" Margin="5,47,4.333,250.667" />
        <ListBox  x:Name="otherContactsListBox" Margin="4,72,3.333,3.667" ItemsSource="{Binding OtherContacts}" ItemTemplate="{StaticResource ContactInfoTemplate}"  VerticalAlignment="Stretch" />
        <Button x:Name="CancelButton" Content="閉じる" Click="CancelButton_Click" Width="75" Height="23" HorizontalAlignment="Right" Margin="0,12,0,0" Grid.Row="1" />
    </Grid>
</controls:ChildWindow>